package com.dream.root.common.response;

/**
 * Created with IntelliJ IDEA.
 * User: liulinhui
 * Date: 17-12-13
 * Time: 上午11:05
 * Description:  响应代码
 */
public enum BaseResponseCode {
    OK(200, "请求成功"),
    NO(100, "请求失败"),

    EXCEPTION(500, "程序出现异常"),

    TOKEN_FAIL_CREATE(501, "TOKEN生成失败"),
    TOKEN_INVALID(502, "TOKEN无效,重新登录"),
    TOO_MANY_REQUESTS(506, "请求提交次数过多,请等待一分钟");

    private final int code;
    private final String message;

    BaseResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
